package coroutines.launch.mode

import kotlinx.coroutines.*

class LaunchDefault {
    companion object {
        suspend fun launchDefault(scope: CoroutineScope): Job {
            return scope.launch(start = CoroutineStart.DEFAULT) {
                println("launch default start")
                println("launch default start delay(1000)")
                delay(1000)
                println("launch default delay(1000) end")
                println("launch default end")
            }
        }
    }
}

fun main() {
    runBlocking {
        val job = LaunchDefault.launchDefault(this)

//        job.start()
        delay(1)
        job.cancel()
    }
}